<template>
  <div>
    <ISeniorSearch :seniorSearchOption="seniorSearchOption"></ISeniorSearch>
  </div>
</template>

<script lang="ts">
import { defineComponent, ref } from 'vue'
import { ISeniorSearch } from '@/entry.esm'
// import { SeniorSearchInterFace } from '@/ISeniorSearch/src/ISeniorSearchInterface'
export default defineComponent({
  name: 'app',
  setup () {
    const seniorSearchOption = ref<any>({
      dialogData: {
        title: '',
        width: 1200, // 弹框名字
        options: {},
        onSubmit: () => {
        //   alert('提交')
        },
        onCancel: () => {
          alert('取消')
        }
      },
      basicForm: {
        labelWidth: 70, // 文本宽度
        form: {
          url: '',
          resourceName: '',
          clueSourceCode: []
        },
        fieldDataList: [
          {
            width: 6,
            type: 'input', // form表单类型
            label: '资源名称', // 字段描述信息
            field: 'resourceName' // form 对应字段
          },
          {
            width: 6,
            type: 'cascader', // form表单类型
            label: '线索来源', // 字段描述信息
            field: 'clueSourceCode', // form 对应字段
            options: { fieldNames: { label: 'clueName', value: 'id' } },
            dataList: [
              {
                id: '614411929707872256',
                clueName: '电话来源',
                sort: '1',
                parentId: '0',
                parentIdList: null,
                parentName: null,
                updateUserName: null,
                updateTime: null,
                children: [
                  {
                    id: '614412976719396865',
                    clueName: '电话-文都网',
                    sort: '1',
                    parentId: '614411929707872256',
                    parentIdList: [
                      '614411929707872256'
                    ],
                    parentName: '电话来源',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614412976719396866',
                    clueName: '电话-百度',
                    sort: '1',
                    parentId: '614411929707872256',
                    parentIdList: [
                      '614411929707872256'
                    ],
                    parentName: '电话来源',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614412976719396868',
                    clueName: '电话-搜狗',
                    sort: '1',
                    parentId: '614411929707872256',
                    parentIdList: [
                      '614411929707872256'
                    ],
                    parentName: '电话来源',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614412976719396869',
                    clueName: '电话-神马',
                    sort: '1',
                    parentId: '614411929707872256',
                    parentIdList: [
                      '614411929707872256'
                    ],
                    parentName: '电话来源',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614412976719396870',
                    clueName: '电话-网站SEO',
                    sort: '1',
                    parentId: '614411929707872256',
                    parentIdList: [
                      '614411929707872256'
                    ],
                    parentName: '电话来源',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614412976719396871',
                    clueName: '电话-社群',
                    sort: '1',
                    parentId: '614411929707872256',
                    parentIdList: [
                      '614411929707872256'
                    ],
                    parentName: '电话来源',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614412976719396873',
                    clueName: '电话-微信公众号',
                    sort: '1',
                    parentId: '614411929707872256',
                    parentIdList: [
                      '614411929707872256'
                    ],
                    parentName: '电话来源',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614412976719396874',
                    clueName: '电话-百度品专',
                    sort: '1',
                    parentId: '614411929707872256',
                    parentIdList: [
                      '614411929707872256'
                    ],
                    parentName: '电话来源',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614412976719396875',
                    clueName: '电话-搜狗品跑',
                    sort: '1',
                    parentId: '614411929707872256',
                    parentIdList: [
                      '614411929707872256'
                    ],
                    parentName: '电话来源',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614412976719396876',
                    clueName: '电话-抖音信息流',
                    sort: '1',
                    parentId: '614411929707872256',
                    parentIdList: [
                      '614411929707872256'
                    ],
                    parentName: '电话来源',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614412976719396877',
                    clueName: '电话-广点通',
                    sort: '1',
                    parentId: '614411929707872256',
                    parentIdList: [
                      '614411929707872256'
                    ],
                    parentName: '电话来源',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614412976719396878',
                    clueName: '电话-百度知了',
                    sort: '1',
                    parentId: '614411929707872256',
                    parentIdList: [
                      '614411929707872256'
                    ],
                    parentName: '电话来源',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614412976719396879',
                    clueName: '电话-美团/大众',
                    sort: '1',
                    parentId: '614411929707872256',
                    parentIdList: [
                      '614411929707872256'
                    ],
                    parentName: '电话来源',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614412976719396867',
                    clueName: '电话-360',
                    sort: '2',
                    parentId: '614411929707872256',
                    parentIdList: [
                      '614411929707872256'
                    ],
                    parentName: '电话来源',
                    updateUserName: '张浩波',
                    updateTime: 1640078567,
                    children: null
                  }
                ]
              },
              {
                id: '614416991041617920',
                clueName: '讲座/公开课',
                sort: '1',
                parentId: '0',
                parentIdList: null,
                parentName: null,
                updateUserName: null,
                updateTime: null,
                children: [
                  {
                    id: '614416991041617921',
                    clueName: '9期总裁班',
                    sort: '1',
                    parentId: '614416991041617920',
                    parentIdList: [
                      '614416991041617920'
                    ],
                    parentName: '讲座/公开课',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614416991041617922',
                    clueName: '西安商会',
                    sort: '1',
                    parentId: '614416991041617920',
                    parentIdList: [
                      '614416991041617920'
                    ],
                    parentName: '讲座/公开课',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614416991041617924',
                    clueName: '咨询会',
                    sort: '1',
                    parentId: '614416991041617920',
                    parentIdList: [
                      '614416991041617920'
                    ],
                    parentName: '讲座/公开课',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614416991041617925',
                    clueName: '试听课',
                    sort: '1',
                    parentId: '614416991041617920',
                    parentIdList: [
                      '614416991041617920'
                    ],
                    parentName: '讲座/公开课',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  },
                  {
                    id: '614416991041617926',
                    clueName: '其他',
                    sort: '1',
                    parentId: '614416991041617920',
                    parentIdList: [
                      '614416991041617920'
                    ],
                    parentName: '讲座/公开课',
                    updateUserName: null,
                    updateTime: null,
                    children: null
                  }
                ]
              }
            ]
          },
          {
            width: 6,
            type: 'input', // form表单类型
            label: 'url1', // 字段描述信息
            field: 'url' // form 对应字段
          }
        ]
      },
      seniorForm: {
        labelWidth: 80, // 文本宽度
        form: {
          name: '',
          authType: '',
          date: [],
          date1: ''
        },
        fieldDataList: [
          {
            type: 'input', // form表单类型
            label: '姓名', // 字段描述信息
            field: 'name' // form 对应字段
          },
          {
            type: 'select', // form表单类型
            label: '是否验证', // 字段描述信息
            field: 'authType', // form 对应字段
            dataList: [
              {
                label: '测试1',
                value: '2'
              },
              {
                label: '测试2',
                value: '1'
              }
            ]
          },
          {
            type: 'select', // form表单类型
            label: '是否验证1', // 字段描述信息
            field: 'authType1', // form 对应字段
            dataList: [
              {
                label: '测试3',
                value: '3'
              },
              {
                label: '测试4',
                value: '4'
              }
            ]
          },
          {
            type: 'rangePicker', // form表单类型
            label: '时间', // 字段描述信息
            field: 'date' // form 对应字段
          },
          {
            type: 'datePicker', // form表单类型
            label: '时间1', // 字段描述信息
            field: 'date1' // form 对应字段
          }
        ]
      }
    })
    return {
      seniorSearchOption
    }
  },
  components: {
    ISeniorSearch
  }
})
</script>
